const { Select } = antd;
import hook from '../hook.js';
export default hook.buildItem({
	is: Select
}, {
	// 必须指定onChange，否则下拉多选时，会触发校验规则
	eventName: 'onChange',
	groupConfig: {
		is: Select.Option,
		type: 'options',
		method: 'select'
	},
	defaultValue: ({ mode }) => {
		if (mode === 'multiple' || mode === 'tags') {
			return [];
		} else {
			return null;
		}
	}
});